home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d20 / ekorpt20.arc / LSORT311.ARC / LSORT.DOC < prev    next >
Text File  |  1990-12-13  |  53KB  |  1,090 lines

  1. LSORT 3.11 (C) Copyright London Computing, 1983,1984,1985,1986,1987,1988,1990.
  2. All rights reserved.
  3.  
  4. LSORT is a general purpose sort/merge utility written in Microsoft C 5.1.
  5. It runs on IBM PCs and compatibles with at least 192KB and either two floppy
  6. disks or a fixed disk.  It runs best when there is at lease 320KB available.
  7.  
  8. LSORT is User Supported Software,  if this program proves useful, please
  9. make a contribution ($25 suggested) to:
  10.  
  11. London Computing, P.O. Box 696  Cherry Hill, NJ 08003
  12.  
  13. Anyone sending a contribution will receive a disk containing the source code
  14. to LSORT as well as a copy of the LSRT sort filter.  LSRT is similar to the
  15. DOS SORT filter but works much faster and will sort on multiple fields.
  16.  
  17. You may make copies of this software and distribute to other users as long as
  18. there is no charge or other consideration and this notice is not removed or
  19. bypassed.
  20.  
  21. LSORT will sort MSDOS files and dBase II and dBase III databases. (dBase III
  22. memo files are not sorted but .DBF files will be sorted.)  Each file may be
  23. sorted using 1 to 32 sort fields. The file to be sorted may contain either
  24. fixed length records, variable length records or comma delimited records.
  25. Variable length records are records ending with cr/lf. Comma delimited records
  26. are variable length records where the fields are also variable length and
  27. separated by a comma. Character fields may be enclosed in either single or
  28. double quotes. It will merge up to 5 files using 1 to 32 sort fields. dBase
  29. databases may not be merged. Any field may be sorted in either ascending or
  30. descending sequence. LSORT allows for three user defined field types to be
  31. used: X,Y and Z. You must write your own comparison subroutine to compare user
  32. defined fields.
  33.  
  34. The sort knows about:                       field type
  35.  
  36. character fields (to 127 bytes)                   C
  37. upper case character fields (sort fields are      U
  38.    translated to upper case before compare)
  39. 2 byte integers in internal  format               I
  40. 4 byte integers in internal format                L
  41. floating point numbers (ieee)                     F
  42. double precision floating point (ieee)            D
  43. zoned decimal  numbers                            N
  44.    (Text format numbers,  Decimals are allowed)
  45.    (LSORT now supports scientific notation as)
  46.    (well, using E notation, eg. .98 == 9.8E-1)
  47. 1 byte logical fields (dBase II or III)           T
  48. User defined field type X                         X
  49. User defined field type Y                         Y
  50. User defined field type Z                         Z
  51.  
  52. A zoned decimal number is stored as a character string and may contain
  53. leading and trailing spaces, minus sign, decimal point and digits.
  54.  
  55. NOTE: zoned decimal numbers sort very slowly!
  56. The only reasonable field types for comma delimited files are C or N. LSORT
  57. will accept other field types, but the results are undefined.
  58.  
  59.  
  60. LSORT will prompt you for all parameters and file names or you may specify
  61. some or all of the parameters on the command line when you invoke the sort.
  62.  
  63. The maximum record length is 4096 bytes.  Files will be sorted in memory if
  64. possible.
  65.  
  66. Files larger than available memory are sorted in pieces and then merged
  67. together.  If you have a floppy only system, you should have LSORT on the A
  68. drive and the file to be sorted on the B drive.  Place a copy of LSORT on an
  69. otherwise empty disk and use as your A drive.  You may need a formatted empty
  70. disk for work files on the B drive.
  71.  
  72.  
  73. SYNTAX:
  74.  
  75.  
  76. LSORT [-h | -m] -- will prompt you for all necessary information.
  77.  or
  78. LSORT [-h | -m] sort specifications--will take the specification specified and
  79.                                   prompt you for any others.
  80.  
  81. Specify -h if you are using a fixed (hard disk) for your output and merge
  82. files. This will eliminate mount messages. This is the default for LSORT 3.01.
  83. Specify -m if you are using mountable disks (floppy, Bournouli, etc.).  This
  84. allows you to mount disks to contain work files and output files.
  85.  
  86.  or
  87.  
  88. LSORT -R  -- will restart a sort.
  89.  
  90.  
  91. Sort Specifications:
  92.  
  93. You will be asked to specify either a SORT or MERGE operation.
  94.  
  95. If you ask for a SORT, you may tell LSORT to use either a QUICKSORT or
  96. HEAPSORT for internal sorting.  You will also be asked to specify two
  97. devices to hold merge files if any are needed.  Merge files may be placed on
  98. floppy disk, hard disk or RAM disk.  The specified drive must be large
  99. enough to hold the entire input file.  You will be given the opportunity to
  100. change floppy disks if desired before each merge drive is used and before
  101. the output file is written.  The program will wait for you to press 'Y'
  102. before proceeding.  This is not really a problem for unattended sorting
  103. if you use redirected input or specify all prompts on the command line.
  104.  
  105. If you specify SORT or MERGE you will be prompted for your input file(s) and
  106. output file as well as the definition of the key fields to be used in the
  107. comparisons.  Fields are specified by their starting position and length.
  108. The types of fields have been listed above.
  109.  
  110. The sort specifications may be entered on the command line in the order
  111. requested by LSORT. Each parameter should be separated from the others with
  112. one or more spaces.  You will not be prompted for any specification on the
  113. command line (including requests to change disks).
  114.  
  115. The sort will ask for the following information in the order shown:
  116.  
  117. Type of Sort:  You may reply:
  118. S -- for QUICKSORT
  119. H -- for HEAPSORT
  120.  
  121. Merge Drive 1:  You may reply with any drive letter, although it is best to
  122. specify a fixed disk (if any).
  123.  
  124.  
  125. Merge Drive 2:  This should be different from drive 1 if you are using
  126. floppy disks, but should be a fixed disk if you have one.
  127.  
  128. Name of input file: You may specify any name including drive letter and
  129. path.  Specify :X to use a user specified input routine.
  130.  
  131. Name of output file:  See above.  Specify :X to use a user specified output
  132. routine.
  133.  
  134. File Type (Unless you are sorting a dBase file):  You may reply F for a
  135. fixed length file (all records are the same length), V for a varying
  136. length file (records must end with CR LF.) or D for comma delimited files.
  137.  
  138.  
  139. If you entered 'F' for a fixed file, you will be prompted for the record
  140. length.
  141.  
  142. You will then be prompted for field definitions.  Each field definition has
  143. four parts:    starting position (from 1)  or  starting field (delimited files)
  144.                field length (in bytes)         (no prompt for delimited files)
  145.                field type (See above list of valid types)
  146.                sort order (A--Ascending, D--Descending)
  147.  
  148. In order to work as efficiently as possible, LSORT does not check the
  149. starting position of a field against the actual length of a record.  If some
  150. field starts past the end of a record (e.g. sort field 1 starts in column 10
  151. but the record is only 8 bytes long), the results will be undefined and most
  152. certainly not what you want.  Please be careful.
  153.  
  154. Enter a '0' for the starting position to end the prompt for field
  155. definitions.
  156.  
  157. If you are sorting a dBase file, you will see a list of fields.  You may
  158. specify a field by name, in which case you will only be prompted for the
  159. sort order or you may enter starting position, length, type and order as
  160. above.
  161.  
  162. Following the '0' that ends field definitions, you may specify a series of
  163. 'Y's if you know that the disks currently mounted will hold merge work files
  164. and the output file.  These may be omitted if you specified the -H flag.
  165.  
  166. example 1:
  167.  
  168. Sort file test.dat on positions 1-5,char,ascending and 6-7, binary integer,
  169. descending.  Use drive C for the work files and put the sorted file in
  170. test.srt.
  171.  
  172. Issue the following command:
  173.  
  174. LSORT S C C test.dat test.srt V 1 5 C A 6 2 H D 0 Y Y Y
  175.       | | | |        |        | |_____| |_____| | | | |
  176.       | | | input    output   F |       |       | | | response to mount
  177.       | | | file     file     i sort    sort    | | | output file message.
  178.       | | | name     name     l field 1 field 2 | | |
  179.       | | |                   e starts  starts  | | response to mount 2nd
  180.       | | merge drive 2         at byte at byte | | merge volume message.
  181.       | |                     T 1, is 5 6, is 2 | |
  182.       | merge drive 1         y byte    byte    | response to mount first
  183.       |                       p char-   long    | merge volume message.
  184.       sort using              e acter   integer |
  185.       quicksort                 string  sorted  ends list of sort fields.
  186.                                 ascend- descend-
  187.                                 ing     ing
  188.  
  189.  
  190.  
  191. Merge Specification:
  192.  
  193. Enter 'M' to indicate the merge operation.
  194.  
  195. You will be asked to enter the number of files to be merged followed by 1-5
  196. files to be merged. They are entered one at a time.
  197.  
  198. You will be asked to enter a file type, output file and a field list as
  199. above.
  200.  
  201. example:
  202.  
  203. Merge files t1.dat t2.dat and t3.dat on positions 4-7 defined as a character
  204. field, ascending.
  205.  
  206. LSORT M 3 t1.dat t2.dat t3.dat   test.mrg V 4 4 c a 0 y y
  207.       | | |      |      |        |        | |_____| | |_|
  208.       | | input  input  input    output   | |       | |
  209.       | | file 1 file 2 file 3   file     | merge   | response to mount
  210.       | |                                 | field   | messages
  211.       | merge 3 files                     | 1       |
  212.       |                                   |         end of list of merge
  213.       do a merge                          file      fields
  214.                                           type
  215. Restarting:
  216.  
  217. If a sort stops in the middle due to lack of space or is stopped by you by
  218. pressing ^BREAK, it may be restarted by issuing the LSORT -R command
  219. providing the dataset(s), SORTPARM.DAT and (DB3PARM.DAT for dBase III files
  220. only) are still available and further providing all files LSMERGE?.DAT are
  221. still available. The sort will be restarted at the beginning of the LSSORT
  222. phase (where the input file is read and sorted) or at the beginning of an
  223. LSMERGE pass, where several partially sorted files are combined.
  224.  
  225. User Exits:
  226.  
  227. You may define your own user exits to read and write data and you may define
  228. your own compare routines for the standard field types or for user defined
  229. field types. These routines must be written in Assembler in DeSmet C88 or in
  230. any other language that can be linked to DeSmet C88.
  231.  
  232. User input:  (Available for Sorting Only)
  233.  
  234. Specify :X as the name of the input file. LSORT uses a routine named USERIP
  235. to read the records to be sorted. You may write your own version of USERIP
  236. and link it with LSORT to create a custom version containing your own input
  237. routine.
  238.  
  239. USERIP is used as follows:
  240.  
  241. int l,userip();
  242. char buffer[...];
  243.  
  244. l = userip(buffer);
  245.  
  246. USERIP must return the length of the record read which must be <= 4096 or -1
  247. for end of file. If you have specified V type files, USERIP must return a
  248. string ending with a '\0'. The string length must include the trailing '\0'.
  249.  
  250. User Output:
  251.  
  252. Specify :X as the name of the output file. LSORT uses a routine called
  253. USEROP to write to the :X file. You may write your own user output routine
  254. to be used to write the final sorted or merged output by creating a custom
  255. version of USEROP and relinking LSORT to create a custom LSORT. USEROP works
  256. as follows:
  257.  
  258. int buflen;
  259. char buffer[...];
  260.  
  261. userop(buffer,buflen);     /* userop must write buflen bytes from buffer */
  262.                            /* buflen == 0 means that you want to write a
  263.                               0 terminated string */
  264. userop(NULL,-1);           /* userop must perform end of file processing */
  265.  
  266.  
  267. Sample versions of userip and userop appear below:
  268. /* Userip to return a varying length string */
  269. #define CPMEOF 26
  270. #include "stdio.h"
  271. userip(s)
  272. char *s;
  273. {
  274.  static char firsttime = 1;
  275.  static int inchan;
  276.  char *fgets();
  277.  int l;
  278.  /* input is string buffer, max length 4k, 4k always available      */
  279.  /* this routine must return length of string or EOF if end of file */
  280.  /* example follows: (Note length of string includes 0 byte at end  */
  281.       if (firsttime) {
  282.             firsttime=0;
  283.             inchan=fopen("usertest.dat","r");
  284.       }
  285.       if (fgets(s,4096,inchan))
  286.             return strlen(s)+1;
  287.       else
  288.             return EOF;
  289. }
  290.  
  291. /* Userip to return a fixed length string */
  292. #define CPMEOF 26
  293. #define STRLEN 128
  294. #include "stdio.h"
  295. userip(s)
  296. char *s;
  297. {
  298.  static char firsttime = 1;
  299.  static int inchan;
  300.  char *fgets();
  301.  int c,l;
  302.  /* input is string buffer, max length 4k, 4k always available      */
  303.  /* this routine must return length of string or EOF if end of file */
  304.  /* example follows: (Note length of string includes 0 byte at end  */
  305.       if (firsttime) {
  306.             firsttime=0;
  307.             inchan=fopen("usertest.dat","r");
  308.       }
  309.       if ((l=read(inchan,buffer,STRLEN)) == STRLEN)
  310.             return STRLEN;
  311.       else
  312.             return EOF;
  313. }
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323. userop(s,l)
  324. char *s;
  325. int l;
  326. {
  327. /* s is string to write, l is length or 0 if 0 terminated or -1 for close */
  328.       static char firsttime = 1;
  329.       static int otchan;
  330.       if (firsttime) {
  331.             firsttime = 0;
  332.             otchan = fopen("usertest.srt","w");
  333.       }
  334.       
  335.       if (l == -1 || s == NULL)
  336.             fclose(otchan);
  337.       else if (l) /* write an F type record */
  338.             while(l--) fputc(*s++,otchan);
  339.       else fputs(s,otchan); /* write a V type record */
  340. }
  341.             
  342.  
  343. User Compare Routines:
  344.  
  345. You may define up three user defined fields: X,Y,Z.  You must write a compare
  346. routine for each field type used.  The routine names are:
  347.  
  348.       sxcmp --  for field type X.
  349.       sycmp --  for field type Y.
  350.       szcmp --  for field type Z.
  351.  
  352. The compare routines are called with three arguments, the address of the
  353. first field, the address of the second field and the field length. The
  354. routine must return 1 if field 1 < field 2, 0 if field1 == field2 and -1 if
  355. field1 > field2.
  356.  
  357. Sample routines are shown below:
  358.  
  359. sxcmp(a,b,l)
  360. long int *a,*b;
  361. int l;
  362. { /* this routine compares two long integers */
  363. long int c;
  364. c = *a - *b;
  365. return c <0 ? -1 : c == 0 ? 0 : 1;
  366. }
  367.  
  368. sycmp(a,b,l)
  369. int *a,*b;
  370. int l;
  371. { /* this routine compares two integers (2 bytes) */
  372. int c;
  373. c = *a - *b;
  374. return c <0 ? -1 : c == 0 ? 0 : 1;
  375. }
  376.  
  377.  
  378. szcmp(a,b,l)
  379. float *a,*b;
  380. int l;
  381. { /* this routine compares two floating numbers */
  382. float c;
  383. c = *a - *b;
  384. return c<0 ? -1 : c == 0 ? 0 : 1;
  385. }
  386.  
  387.  
  388.  
  389. Linking user written routines:
  390.  
  391. For MicroSoft C.
  392.  
  393. Compile your user written routines using Microsoft C 5.1 to create .OBJ files.
  394. Modify the file lsort.crf to include your routines before LSORTCMP:
  395.  
  396. lsort.obj +
  397.                   <=== place your routines here       
  398. lsortcmp.obj +
  399. lsortdbf.obj +
  400. lsortio.obj +
  401. lsortprm.obj +
  402. lsortqk.obj +
  403. lsortsub.obj +
  404. lssort.obj +
  405. lsuser.obj +
  406. lsmerge.obj +
  407. scrsubs.obj dvint.obj
  408.  
  409. Re-link LSORT with the following statement:
  410. LINK /stack:4096 @lsort.crf;
  411.  
  412. LSMENU
  413.  
  414. Enter LSMENU instead of LSORT for the menu driven interface.
  415.  
  416. LSMENU will display an SAA like menu that makes it easier to use LSORT.
  417.  
  418. The menuing system uses drop down menus that allow you to:
  419.  
  420. o   Specify the operations (Sort / Merge) to be performed.
  421. o   Specify Work Drives
  422. o   Specify or Pick Input File(s) using a 'point and shoot' interface.
  423. o   Specify or Pick the Output file.
  424. o   Select the records type: (Fixed, Variable, Delimitted or dBase)
  425. o   Specify the Sort Fields using a context sensitive assistant that will
  426.     either display the names of dBase fields or display a file and let you
  427.     mark fields.
  428. o   Save a sort specification in a file for quick re-use.
  429. o   Load a sort specification.
  430.  
  431. Within LSMENU, the following conventions apply:
  432.  
  433. You select an option by typing the highlighted letter in the option name or
  434. by moving the cursor to that option using the arrow keys, then pression
  435. Enter.
  436.  
  437. You quit any menu option by pressing ESC.  You may use ESC to exit the
  438. program if desired.
  439.  
  440. Selectable options appear as blue on white with one blue letter highlighted.
  441.  
  442. Unavailable options appear as bright white on white.  An unavailable option
  443. becomes available as a by product of selecting other options.
  444.  
  445. When LSMENU is entered, the following menu is displayed:
  446. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  447. │   File    Record    Sortfield    Options                      Help   About   │
  448. └────────────────────────────────┌───────────────┐─────────────────────────────┘
  449.                                  │   HeapSort    │
  450.                                  │   QuickSort   │
  451.                                  │   Merge [ ]   │
  452.                                  │   Work Drive  │
  453.                                  └───────────────┘
  454.  
  455. The Sortfield and Record Options will display as white on white.  This color
  456. combination indicates that the option is not currently available.
  457.  
  458. The Options menu drops down automatically so that you select the type of Sort /
  459. Merge to perform: Heap, Quick or Merge (2-5 files).  When you make your sel-
  460. ection, the Options window closes automatically and the Record and Sortfield
  461. options appear as blue on white, indicating that they are available.  If you
  462. wish to close this or any menu without selecting anything, press ESC.
  463.  
  464. You may then select any other option as desired.  The recommended sequence is
  465. File -- Input,  File -- Output,  Record, Sortfield and File -- Go.
  466.  
  467. The following main menu options are available:
  468.  
  469. File, Record, Sortfield, Options, Help and About.
  470.  
  471. File Menu Option
  472. ----------------
  473. The File option displays the following:
  474.  
  475. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  476. │   File    Record    Sortfield    Options                      Help   About   │
  477. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  478.   │ New    │
  479.   │ Load   │
  480.   │ Save   │
  481.   │ Input  │
  482.   │ Output │
  483.   │ Go     │
  484.   │ Quit   │
  485.   └────────┘
  486.  
  487. New
  488. ---
  489. Select New to clear the sort specification.  This resets any previous
  490. specifications and allows you to start over.
  491.  
  492. Load
  493. ----
  494. Select Load to use an existing sort specification that was saved by the
  495. Save option.  When Load is selected, the following is displayed:
  496.  
  497. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  498. │   File    Record    Sortfield    Options                      Help   About   │
  499. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  500.   │ New    │┌───────────────────── Load Control File ──────────────────────────┐
  501.   │ Load   ││ Current Selection:                                               │
  502.   │ Save   ││                                                                  │
  503.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄▄▄                   ▄▄▄▄▄▄▄▄ │
  504.   │ Output ││ █Select File█                  █ Ok █                   █Cancel█ │
  505.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀▀▀                   ▀▀▀▀▀▀▀▀ │
  506.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  507.   └────────┘
  508.  
  509.             ┌────────────────────────File Selector ──────────────────────────┐
  510.             │Directory of:                                                   │
  511.             │D:\MSC\LSORTX3\*.LSC                                            │
  512.             │────────────────────────────────────────────────────────────────│
  513.             │ <KEY-IT-IN>     ..                                             │
  514.             │ <-A->           TEST.LSC                                       │
  515.             │ <-B->                                                          │
  516.             │ <-C->                                                          │
  517.             │ <-D->                                                          │
  518.             │ <-E->                                                          │
  519.             │ <-F->                                                          │
  520.             │ <-G->                                                          │
  521.             F1=HELP──────────────────────────────────────────────────────────┘
  522. Two new windows are displayed, the Load Control File window and the File
  523. Selector windows.  The File Selector window will be active, with any files
  524. of type .LSC displayed from the current directory.  You can use the file
  525. selector to move to any drive or directory and pick a file to be used as the
  526. control file or you may select <KEY-IT-IN> to enter a filename directly.  More
  527. information about the File Selector is available in file SELEFILE.DOC.
  528.  
  529. To Select a file, move the cursor to the desired file and press Enter.
  530. To Select a drive, move the cursor to a drive indicator, e.g. <-C->, and
  531. press Enter.
  532.  
  533. To Select a directory move the cursor to a directory entry, e.g. .., and
  534. press Enter.
  535.  
  536. To Quit without selecting a file, press ESC.
  537.  
  538. Pressing Enter or ESC closes the File Selector window and displays the
  539. selected file, if any, under Current Selection in the Load Control File
  540. window.  The Load Control File window has three options:  Select, Ok and
  541. Cancel.  Choose Select to redisplay the File Selector.  Choose Ok to
  542. approve the Current Selection and load the control file or choose Cancel
  543. to return to the Files Menu without selecting a control file.
  544.  
  545. Selecting a control file that does not contain control information will
  546. seriously confuse LSMENU.  Don't do it.
  547.  
  548. If you choose OK, the control file will be loaded and your input file,
  549. output file, Options, Record and Sortfield menus will be set to the values
  550. that they had when the control file was created.
  551.  
  552. Save
  553. ----
  554. Select Save to save your current specifications as a control file which can
  555. be loaded from a subsequent invokation of LSMENU.  The following is displayed:
  556.  
  557. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  558. │   File    Record    Sortfield    Options                      Help   About   │
  559. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  560.   │ New    │┌───────────────────── Save Control File ──────────────────────────┐
  561.   │ Load   ││ Current Selection:                                               │
  562.   │ Save   ││                                                                  │
  563.   │ Input  ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                    ▄▄▄▄▄▄▄▄ │
  564.   │ Output ││ █Select File█                 █ Ok █                    █Cancel█ │
  565.   │ Go     ││ ▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                    ▀▀▀▀▀▀▀▀ │
  566.   │ Quit   │└──────────────────────────────────────────────────────────────────┘
  567.   └────────┘
  568.  
  569.             ┌────────────────────────File Selector ──────────────────────────┐
  570.             │Directory of:                                                   │
  571.             │C:\TMP\*.*                                                      │
  572.             │────────────────────────────────────────────────────────────────│
  573.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  574.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  575.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  576.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  577.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  578.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  579.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  580.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  581.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  582.  
  583. The Save Control File window shows the current control file, if any.  The File
  584. Selector window shows all the files in the current directory.  You may select
  585. and existing file to save the sort specification to or use <KEY-IT-IN> to enter
  586. a new file to contain the sort specification.  If you select an existing file,
  587. it will be overwritten with the sort specification and its old contents will
  588. be gone.  BE CAREFUL.
  589.  
  590. As above, once a file name has been entered, you may choose Select, Ok or
  591. Cancel from the Save Control File window.  Ok will save the sort specification.
  592. Cancel will return to the File menu without saving and Select will redisplay
  593. the File Selector.
  594.  
  595. Input
  596. -----
  597. This option is only activated if HeapSort, QuickSort or Merge has been selected
  598. from the Options Menu.  When you are sorting, the following will be displayed:
  599.  
  600. Input-Sort
  601. ----------
  602. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  603. │   File    Record    Sortfield    Options                      Help   About   │
  604. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  605.   │ New    │
  606.   │ Load   │┌───────────────────── Select Input File ──────────────────────────┐
  607.   │ Save   ││ Current Selection:                                               │
  608.   │ Input  ││                                                                  │
  609.   │ Output ││▄▄▄▄▄▄▄▄▄▄▄▄▄                 ▄▄▄▄▄▄                      ▄▄▄▄▄▄▄▄│
  610.   │ Go     ││█Select File█                 █ Ok █                      █Cancel█│
  611.   │ Quit   ││▀▀▀▀▀▀▀▀▀▀▀▀▀                 ▀▀▀▀▀▀                      ▀▀▀▀▀▀▀▀│
  612.   └────────┘└──────────────────────────────────────────────────────────────────┘
  613.  
  614.             ┌────────────────────────File Selector ──────────────────────────┐
  615.             │Directory of:                                                   │
  616.             │D:\MSC\LSORTX3\*.*                                              │
  617.             │────────────────────────────────────────────────────────────────│
  618.             │ <KEY-IT-IN>     ..              LSMENU.C        LSORTX3.H      │
  619.             │ <-A->           CDRIVER.C       LSORT.H         LSORTX3.MAK    │
  620.             │ <-B->           CDRIVER.OBJ     LSORT311.TXT    LSORTX3.OBJ    │
  621.             │ <-C->           CSEXTERN.H      LSORTBAK.ZIP    LSORTX3.OLD    │
  622.             │ <-D->           CSUBS.C         LSORTOS2.ZIP    LSORT_DF.C     │
  623.             │ <-E->           CSUBS.OBJ       LSORTX3.C       LSORT_DF.OBJ   │
  624.             │ <-F->           DUFI$$$$.$$$    LSORTX3.CRF     LSORT_FT.C     │
  625.             │ <-G->           DUFI.C          LSORTX3.EXE     LSORT_FT.OBJ   │
  626.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  627.  
  628. Use the File Selector as above to choose a file to sort and return to the
  629. Select Input File window where you may choose Ok, to set the input file to
  630. your selection, Cancel to quit without selecting an input file or Select File
  631. to redisplay the File Selector.
  632.  
  633. Input - Merge
  634. -------------
  635.  
  636. If you are merging, the following is displayed:
  637. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  638. │   File    Record    Sortfield    Options                      Help   About   │
  639. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  640.   │ New    │
  641.   │ Load   │┌──────────────────────Select Merge Files──────────────────────────┐
  642.   │ Save   ││# Current Selection:                                              │
  643.   │ Input  ││1                                                                 │
  644.   │ Output ││2                                                                 │
  645.   │ Go     ││3                                                                 │
  646.   │ Quit   ││4                                                                 │
  647.   └────────┘│5                                                                 │
  648.             │  Select File Number:                                             │
  649.             │  ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄    ▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄  │
  650.             │  █ 1 █    █ 2 █    █ 3 █    █ 4 █    █ 5 █    █ Ok █   █Cancel█  │
  651.             │  ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀    ▀▀▀▀▀▀   ▀▀▀▀▀▀▀▀  │
  652.             └──────────────────────────────────────────────────────────────────┘
  653.  
  654. Choose the merge file to select by selecting menu options 1,2,3,4 or 5.  If you
  655. select any of these options, the File Selector will be displayed and you can
  656. use it to pick the merge file.  Repeat until all necessary merge files have
  657. been selected, then choose Ok to return to the File menu.
  658.  
  659. Output
  660. ------
  661. Use this option to specify the name of your output file which will contain
  662. the sorted or merged data.  When this option is selected, the following is
  663. displayed:
  664.  
  665. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  666. │   File    Record    Sortfield    Options                      Help   About   │
  667. └─┌────────┐───────────────────────────────────────────────────────────────────┘
  668.   │ New    │
  669.   │ Load   │
  670.   │ Save   │┌───────────────────── Select Output File ─────────────────────────┐
  671.   │ Input  ││ Current Selection:                                               │
  672.   │ Output ││                                                                  │
  673.   │ Go     ││ ▄▄▄▄▄▄▄▄▄▄▄▄▄                  ▄▄▄▄                     ▄▄▄▄▄▄▄▄ │
  674.   │ Quit   ││ █Select File█                  █Ok█                     █Cancel█ │
  675.   └────────┘│ ▀▀▀▀▀▀▀▀▀▀▀▀▀                  ▀▀▀▀                     ▀▀▀▀▀▀▀▀ │
  676.             └──────────────────────────────────────────────────────────────────┘
  677.             ┌────────────────────────File Selector ──────────────────────────┐
  678.             │Directory of:                                                   │
  679.             │C:\TMP\*.*                                                      │
  680.             │────────────────────────────────────────────────────────────────│
  681.             │ <KEY-IT-IN>     ..              LSORT.EXE       LSORTPRM.OBJ   │
  682.             │ <-A->           DUFI.DOC        LSORT.HLP       LSORTQK.OBJ    │
  683.             │ <-B->           DUFI.EXE        LSORT.OBJ       LSORTSUB.OBJ   │
  684.             │ <-C->           DVINT.OBJ       LSORT311.TXT    LSORTX3.EXE    │
  685.             │ <-D->           FILELIST.TXT    LSORTCMP.OBJ    LSRTOS2.EXE    │
  686.             │ <-E->           LSMENU.EXE      LSORTDBF.OBJ    LSSORT.OBJ     │
  687.             │ <-F->           LSMERGE.OBJ     LSORTIO.OBJ     LSUSER.OBJ     │
  688.             │ <-G->           LSORT.CRF       LSORTLNK.BAT    SCRSUBS.OBJ    │
  689.             F1=HELP──────────────────────────────────────────────────── PgDn ┘
  690.  
  691. The File Selector window is active and you can pick an existing file to hold
  692. the output of the sort or merge or you can choose <KEY-IT-IN> to enter a new
  693. file name.  If you select an existing file, it will be overwritten when the
  694. sort / merge is run.  BE CAREFUL.  After specifying a file, the Select Ouput
  695. File window becomes active and you may choose Ok to accept the file name,
  696. Cancel to quit without accepting the file name or Select File to redisplay
  697. the File Selector.
  698.  
  699. GO
  700. --
  701. Select this option to perform the sort or merge.  This option should be
  702. selected ONLY after specifying HeapSort, QuickSort or Merge, Input File(s),
  703. Output File(s), Record Type and Sortfields.  If you select GO before all of
  704. the necessary information has been specified, an error message will be dis-
  705. played showing those pieces of information that are missing.  The message
  706. will be similar to that shown below:
  707.  
  708. ┌─────────────────────────────────────────────────────────┐
  709. │                                                         │
  710. │ Unable to RUN Sort because:                             │
  711. │                                                         │
  712. │ Sort or Merge not selected on Options Screen.           │
  713. │ No sort input file was specified.                       │
  714. │ No output file was specified.                           │
  715. │ No sort/merge fields were defined.                      │
  716. │                                                         │
  717. │                                                    ▄▄▄▄ │
  718. │                                                    █Ok█ │
  719. │                                                    ▀▀▀▀ │
  720. └─────────────────────────────────────────────────────────┘
  721.  
  722. If everything has bee specified, the menu will disapear and standard LSORT
  723. output will be displayed, the file(s) will be sorted or merged and control
  724. will return to the standard DOS prompt.
  725.  
  726. Quit
  727. ----
  728. Select this option to quit the menu system without running a Sort.  You will
  729. be given a chance to change your mind when the following is displayed:
  730.  
  731. ┌───────────────┐
  732. │ Quit LSMENU ? │
  733. │ ▄▄▄▄ ▄▄▄▄▄▄▄▄ │
  734. │ █Ok█ █Cancel█ │
  735. │ ▀▀▀▀ ▀▀▀▀▀▀▀▀ │
  736. └───────────────┘
  737.  
  738. If you select Ok, you will exit to the command line.  If you select Cancel,
  739. you will return to the File Menu.
  740.  
  741.  
  742. Record Menu Option
  743. ------------------
  744.  
  745. The record option allows you to pick the type of record to be sorted.  The
  746. following will be displayed:
  747.  
  748. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  749. │   File    Record    Sortfield    Options                      Help   About   │
  750. └─────────┌───────────────┐────────────────────────────────────────────────────┘
  751.           │   Fixed    0  │
  752.           │ √ Variable    │
  753.           │   Delimited   │
  754.           │   dBase       │
  755.           └───────────────┘
  756.  
  757. Use this menu to pick the record type.  The default type is Variable and is
  758. shown marked with a check.  Variable records are variable length, contain
  759. ASCII characters only and are terminated with a CR-LF.  To select variable,
  760. type V or move the cursor to the variable line and press Enter.  If the check
  761. mark is on a different type it will be moved to the Variable line.  Press
  762. ESC to return to the main menu.
  763.  
  764. You may also select Fixed, Delimited or dBase.  If you select Fixed, you will
  765. be prompted for the number of characters in the record.  Enter the number and
  766. press Enter.  (Fixed records are all the same length.  You must tell the LSMENU
  767. what that length is.)  The check mark will move to the Fixed Line and the
  768. record length will be displayed next to the word fixed.  Press ESC to return
  769. to the main menu.
  770.  
  771. If you select Delimited (fields are comma delimitted) or dBase, the check mark
  772. will move to the appropriate line.  Press ESC to return to the main menu.
  773.  
  774. SortField Menu Option
  775. ---------------------
  776. Select Sortfield to specify the fields to sort on.  You should specify
  777. Record Type before selecting Sortfields.  A different menu is displayed
  778. depending on the record type.
  779.  
  780. In all cases, you must first specify a sort field by moving the blue
  781. cursor to the desired field number.  You may then Add a new field, pushing
  782. all the current specification and subsequent specifications down one slot,
  783. Delete a field, moving following specifications up one slot or Edit the field.
  784.  
  785. To quit the SortFields Menu, press ESC.
  786.  
  787. Fixed or Variable Records
  788. -------------------------
  789. If the record type is Fixed or Variable the following screen is displayed with
  790. a high lighted cursor set to Sort Field 1.
  791. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  792. │   File    Record    Sortfield    Options                      Help   About   │
  793. ├──────╥────────┬──────┬─────┬────┬─────┬──────╥────────┬──────┬─────┬────┤────┘
  794. │Sort  ║Starting│Field │Field│Asc/│     │Sort  ║Starting│Field │Field│Asc/│
  795. │Field ║Position│Length│Type │Dec.│     │Field ║Position│Length│Type │Dec.│
  796. ╞══════╬════════╪══════╪═════╪════╡     ╞══════╬════════╪══════╪═════╪════╡
  797. │ __1_ ║      0 │    0 │     │    │     │  17  ║      0 │    0 │     │    │
  798. │   2  ║      0 │    0 │     │    │     │  18  ║      0 │    0 │     │    │
  799. │   3  ║      0 │    0 │     │    │     │  19  ║      0 │    0 │     │    │
  800. │   4  ║      0 │    0 │     │    │     │  20  ║      0 │    0 │     │    │
  801. │   5  ║      0 │    0 │     │    │     │  21  ║      0 │    0 │     │    │
  802. │   6  ║      0 │    0 │     │    │     │  22  ║      0 │    0 │     │    │
  803. │   7  ║      0 │    0 │     │    │     │  23  ║      0 │    0 │     │    │
  804. │   8  ║      0 │    0 │     │    │     │  24  ║      0 │    0 │     │    │
  805. │   9  ║      0 │    0 │     │    │     │  25  ║      0 │    0 │     │    │
  806. │  10  ║      0 │    0 │     │    │     │  26  ║      0 │    0 │     │    │
  807. │  11  ║      0 │    0 │     │    │     │  27  ║      0 │    0 │     │    │
  808. │  12  ║      0 │    0 │     │    │     │  28  ║      0 │    0 │     │    │
  809. │  13  ║      0 │    0 │     │    │     │  29  ║      0 │    0 │     │    │
  810. │  14  ║      0 │    0 │     │    │     │  30  ║      0 │    0 │     │    │
  811. │  15  ║      0 │    0 │     │    │     │  31  ║      0 │    0 │     │    │
  812. │  16  ║      0 │    0 │     │    │     │  32  ║      0 │    0 │     │    │
  813. └──────╨────────┴──────┴─────┴────┘     └──────╨────────┴──────┴─────┴────┘
  814.  
  815. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  816.  
  817. You may specify up to 32 different fields for sorting or merging.  A sort field
  818. specification consists of four entries, the field starting position (relative
  819. to 1), the field length, the field type and the sort order.  To select a sort
  820. field, move the cursor to that field number.  You may now press Enter to edit
  821. that sort field, Del to delete that sort field or Ins to insert a new field.
  822.  
  823. Deleting a sort field will move all following fields up one slot.  Inserting
  824. a sort field moves all fields down one slot and creates an empty specification
  825. at the selected field.
  826.  
  827. Editing a sort field allows you to enter or change starting position, field
  828. length, field type and sort order.
  829.  
  830. The four parts of a sort field specification consist of:
  831.  
  832. o    Starting Position, which indicates where the field starts relative to the
  833. first character in the record. Position 1 is the first charactter, position 2
  834. the second and so forth.
  835.  
  836. o   Field Length indicates how many characters or bytes are in the field.
  837.  
  838. o   Field Type indicates the type of field.  If you know the field type, just
  839. enter the correct code. If you don't know the field type, press F1 and the
  840. following will pop up:
  841.  
  842. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  843. │Character (case is signficant)│     the cursor and pressing enter or by
  844. │Double floating point         │     pressing the first letter on the line.
  845. │Floating point (single)       │
  846. │Integer (16 bit signed)       │     Once selected, the pop up window will
  847. │Long (32 bit signed integer)  │     close and the desired code will be
  848. │Numeric (ASCII text)          │     shown in the input field.
  849. │True/false (dBase logical)    │
  850. │Upper (character case ignored)│
  851. │X (user defined field type X) │
  852. │Y (user defined field type Y) │
  853. │Z (user defined field type Z) │
  854. └──────────────────────────────┘
  855.  
  856. o   Sort Order (Asc/Dec) indicates whether the field should be sorted in
  857. ascending or descending sequence.  If you leave it flank, press F1 or enter
  858. and invalid menu, a small pop up appears showing good values.
  859.  
  860. If you press F1 while in the Starting Position or Field Length columns, a
  861. special field selector window will be displayed.  You can use this window
  862. to display the first few lines of the file to be sorted.  You can display
  863. data in text or dump format.  The window is shown below:
  864.  
  865. ╔══════════════════════════════════════════════════════════════════════════════╗
  866. ║LSORTX3.MAK                                                   R1      , C1    ║
  867. ║------------------------------------------------------------------------------║
  868. ║PROJ   =LSORTX3                                                               ║
  869. ║DEBUG  =1                                                                     ║
  870. ║CC     =cl                                                                    ║
  871. ║CFLAGS_G   = /AS /W3                                                          ║
  872. ║------------------------------------------------------------------------------║
  873. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  874. ╚══════════════════════════════════════════════════════════════════════════════╝
  875.  
  876. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  877. You can position to any character in the record using the Left arrow and Right
  878. arrow.  In order to mark a field, use the Left and Right arrows to position to
  879. the first character of the field, then press F5.  Continue using the Right
  880. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  881. video.  When you have marked the last character of the field, press Enter.
  882.  
  883. You may perform this operation as many times as you desire.  Only the last
  884. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  885. ing position and field length will be entered into the screen.
  886.  
  887. Delimitted Records
  888. ------------------
  889. If your record type is Delimited, the following will be displayed:
  890.  
  891. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  892. │   File    Record    Sortfield    Options                      Help   About   │
  893. ├──────╥───────┬─────┬────┬─────────────┬──────╥───────┬─────┬────┬────────────┘
  894. │Field ║Field  │Field│Asc/│ Delimitted  │Field ║Field  │Field│Asc/│
  895. │Number║Pos'n  │Type │Dec.│    File     │Number║Pos'n  │Type │Dec.│
  896. ╞══════╬═══════╪═════╪════╡             ╞══════╬═══════╪═════╪════╡
  897. │   1  ║      0│     │    │             │  17  ║      0│     │    │
  898. │   2  ║      0│     │    │             │  18  ║      0│     │    │
  899. │   3  ║      0│     │    │             │  19  ║      0│     │    │
  900. │   4  ║      0│     │    │             │  20  ║      0│     │    │
  901. │   5  ║      0│     │    │             │  21  ║      0│     │    │
  902. │   6  ║      0│     │    │             │  22  ║      0│     │    │
  903. │   7  ║      0│     │    │             │  23  ║      0│     │    │
  904. │   8  ║      0│     │    │             │  24  ║      0│     │    │
  905. │   9  ║      0│     │    │             │  25  ║      0│     │    │
  906. │  10  ║      0│     │    │             │  26  ║      0│     │    │
  907. │  11  ║      0│     │    │             │  27  ║      0│     │    │
  908. │  12  ║      0│     │    │             │  28  ║      0│     │    │
  909. │  13  ║      0│     │    │             │  29  ║      0│     │    │
  910. │  14  ║      0│     │    │             │  30  ║      0│     │    │
  911. │  15  ║      0│     │    │             │  31  ║      0│     │    │
  912. │  16  ║      0│     │    │             │  32  ║      0│     │    │
  913. └──────╨───────┴─────┴────┘             └──────╨───────┴─────┴────┘
  914.  
  915. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  916.  
  917. You select fields to edit, insert or delete as described above. You may specify
  918. up to 32 different fields for sorting or merging.  Field Pos'n indicates which
  919. comma seperated field is to be sorted.  Fields are numbered from 1.  Field Type
  920. indicates the type of field.  If you know the field type, just enter the
  921. correct code.  If you don't know the field type, press F1 and the following
  922. will pop up:
  923.  
  924. ╒═══════Select Field Type══════╕     Choose the desired field type by moving
  925. │Character (case is signficant)│     the cursor and pressing enter or by
  926. │Double floating point         │     pressing the first letter on the line.
  927. │Floating point (single)       │
  928. │Integer (16 bit signed)       │     Once selected, the pop up window will
  929. │Long (32 bit signed integer)  │     close and the desired code will be
  930. │Numeric (ASCII text)          │     shown in the input field.
  931. │True/false (dBase logical)    │
  932. │Upper (character case ignored)│     The Asc/Dec field should be set to A
  933. │X (user defined field type X) │     to sort from low to high or D to sort
  934. │Y (user defined field type Y) │     from high to low.  If you enter anything
  935. │Z (user defined field type Z) │     else a small pop up window will appear,
  936. └──────────────────────────────┘     showing the two valid choices.
  937.  
  938. If you press F1 while in the Field Pos'n column, a special field selector
  939. window will be displayed.  You can use this window to display the first few
  940. lines of the file to be sorted.  You can display data in text or dump format.
  941. The window is shown below:
  942.  
  943. ╔══════════════════════════════════════════════════════════════════════════════╗
  944. ║LSORTX3.MAK                                                   R1      , C1    ║
  945. ║------------------------------------------------------------------------------║
  946. ║PROJ   ,LSORTX3                                                               ║
  947. ║DEBUG  ,1                                                                     ║
  948. ║CC     ,cl                                                                    ║
  949. ║CFLAGS_G,/AS, /W3                                                             ║
  950. ║------------------------------------------------------------------------------║
  951. ║   PgUp PgDn Home End, ^Home-Top, ^End-Bot, F1-Help, F3-Hex, F5-Mark, ESC-Quit║
  952. ╚══════════════════════════════════════════════════════════════════════════════╝
  953.  
  954. You can position to any record using the Up arrow, Down arrow, PgUp and PgDn.
  955. You can position to any character in the record using the Left arrow and Right
  956. arrow.  In order to mark a field, use the Left and Right arrows to position to
  957. the first character of the field, then press F5.  Continue using the Right
  958. arrow to mark each charcter in turn.  Marked characters are shown in reverse
  959. video.  When you have marked the last character of the field, press Enter.
  960.  
  961. You may perform this operation as many times as you desire.  Only the last
  962. mark is remembered.  Press ESC to return to the Sortfields screen.  The start-
  963. ing position and field length will be entered into the screen.
  964.  
  965. dBase Records
  966. -------------
  967. The following screen is displayed for dBase records.
  968.  
  969. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  970. │   File    Record    Sortfield    Options                      Help   About   │
  971. ├──────╥───────────┬──────┬─────┬────┬────┬──────╥───────────┬──────┬─────┬────┤
  972. │Sort  ║Field Name │Field │Field│Asc/│ d  │Sort  ║Field Name │Field │Field│Asc/│
  973. │Field ║or Position│Length│Type │Dec.│ B  │Field ║or Position│Length│Type │Dec.│
  974. ╞══════╬═══════════╪══════╪═════╪════╡ a  ╞══════╬═══════════╪══════╪═════╪════╡
  975. │   1  ║           │    0 │     │    │ s  │  17  ║           │    0 │     │    │
  976. │   2  ║           │    0 │     │    │ e  │  18  ║           │    0 │     │    │
  977. │   3  ║           │    0 │     │    │    │  19  ║           │    0 │     │    │
  978. │   4  ║           │    0 │     │    │ F  │  20  ║           │    0 │     │    │
  979. │   5  ║           │    0 │     │    │ i  │  21  ║           │    0 │     │    │
  980. │   6  ║           │    0 │     │    │ l  │  22  ║           │    0 │     │    │
  981. │   7  ║           │    0 │     │    │ e  │  23  ║           │    0 │     │    │
  982. │   8  ║           │    0 │     │    │    │  24  ║           │    0 │     │    │
  983. │   9  ║           │    0 │     │    │    │  25  ║           │    0 │     │    │
  984. │  10  ║           │    0 │     │    │    │  26  ║           │    0 │     │    │
  985. │  11  ║           │    0 │     │    │    │  27  ║           │    0 │     │    │
  986. │  12  ║           │    0 │     │    │    │  28  ║           │    0 │     │    │
  987. │  13  ║           │    0 │     │    │    │  29  ║           │    0 │     │    │
  988. │  14  ║           │    0 │     │    │    │  30  ║           │    0 │     │    │
  989. │  15  ║           │    0 │     │    │    │  31  ║           │    0 │     │    │
  990. │  16  ║           │    0 │     │    │    │  32  ║           │    0 │     │    │
  991. └──────╨───────────┴──────┴─────┴────┘    └──────╨───────────┴──────┴─────┴────┘
  992.  
  993. ESC=Exit, F1=Help, ENTER=Edit Field, INS=Insert Field, DEL=Delete Field
  994.  
  995. You specify a sort field by moving the cursor to the desired field.  You may
  996. then insert, delete or edit fields as described above.
  997.  
  998. You may specify up to 32 sort fields.  Four pieces of information are required
  999. for each sort field:  the dBase field name or starting position, the field
  1000. length, the field type and the sort order.
  1001.  
  1002. If you are in the Field Name column and press F1, a list of sort fields will
  1003. be displayed.  The list will be similar to the following:
  1004.  
  1005. ╔═════════════════════════╗     You can select a field from the list by moving
  1006. ║Database Name: NOTES.DB  ║     the cursor to the desired field and pressing
  1007. ╟───────────┬────┬────┬───╢     Enter.  When a field is selected, the name
  1008. ║Field Name │Type│Len │Dec║     length and type are entered automatically.
  1009. ╠═══════════╧════╧════╧═══╣
  1010. ║TEXT         C    65    0║     You may change the selected type or length in
  1011. ║TREATNO      C     9    0║     order to specify if you desire.  Increasing
  1012. ║SEQNO        N     3    0║     the field length will include part of the
  1013. ║                         ║     following field.  Decreasing the field length
  1014. ║                         ║     will sort on only the first part of a field.
  1015. ║                         ║
  1016. ║                         ║     Changing the field type from N to C will cause
  1017. ║                         ║     a numeric field to be sorted as though it
  1018. ║                         ║     contained characters.
  1019. ║                         ║
  1020. ║                         ║     If you wish to sort on middle or end positions
  1021. ║                         ║     of a field, you may do so by entering the
  1022. ║                         ║     starting position of the field to sort relative
  1023. ║                         ║     to the first character of the first field.
  1024. ║                         ║
  1025. ║                         ║     The first field always starts in position 2.
  1026. ╚═════════════════════════╝
  1027.  
  1028. You can find out where a field starts, e.g. SEQNO, by entering the field name
  1029. in an unused sort field line, then quitting the sort field menu, changing the
  1030. Record Type to Variable and redisplaying the SortField menu.  All field names
  1031. will be replaced by their starting position.  Note where the field starts, exit
  1032. SortFields, change the Record Type back to dBase and re-enter the SortField
  1033. menu.  You will again see field names.  Replace the name, e.g. SEQNO, with the
  1034. starting position plus the desired offset of the sub field.  In the above
  1035. example, SEQNO starts at position 76.  If you wish to sort on the second and
  1036. third positions of SEQNO only, Enter 77 for the Field Name and 2 for the
  1037. length.
  1038.  
  1039. Options Menu Option
  1040. -------------------
  1041.  
  1042. Select the Options menu option to specify the type of operation to be per-
  1043. formed (HeapSort, QuickSort or Merge) and to specify work drives if you have
  1044. selected a Sort option.  The Options display was described above.
  1045.  
  1046. If you select a Sort Option, you can use the Work Drive menu item to indicate
  1047. where your sort work drives are to be placed.  The default is drive C.
  1048.  
  1049. If you select Merge, you will be asked for the number of files to merge.  You
  1050. may pick a number between 2 and 5.  Selecting the Merge option disables the
  1051. Work Drives.
  1052.  
  1053.  
  1054. Help Menu Option
  1055. ----------------
  1056.  
  1057. This option displays a one page help summary describing the menuing system.
  1058.  
  1059.  
  1060. About Menu Option
  1061. -----------------
  1062. The About option displays the following:
  1063.  
  1064. ┌─────────────────────────────────────────────────────────────────LSMENU 1.00──┐
  1065. │   File    Record    Sortfield    Options                      Help   About   │
  1066. └──────────────────────────────────────────────────────────────────────────────┘
  1067.  
  1068.                   ┌──────────────────────────────────────────────┐
  1069.                   │ LSMENU Version 1.00                          │
  1070.                   │    Copyright LONDON COMPUTING 1989           │
  1071.                   │                                              │
  1072.                   │ LSORT Version 3.10                           │
  1073.                   │    Copyright LONDON COMPUTING 1983 to 1989   │
  1074.                   │                                              │
  1075.                   │ All rights reserved.                         │
  1076.                   │                                              │
  1077.                   │ LSMENU and LSORT are User Supported Software │
  1078.                   │ Registration ($25.00) required.  Please send │
  1079.                   │ registration fees to:                        │
  1080.                   │ LONDON COMPUTING                      ▄▄▄▄▄▄ │
  1081.                   │ P.O. Box 696                          █ OK █ │
  1082.                   │ Cherry Hill, NJ  08003                ▀▀▀▀▀▀ │
  1083.                   └──────────────────────────────────────────────┘
  1084.  
  1085.  
  1086. You can close the about window by pressing the letter O, pressing ENTER or
  1087. pressing ESC.
  1088.  
  1089.  
  1090.